import request from '@/config/axios'

export interface WelcomeConfigVO {
        id: number
        configName: string
        content: string
        faList: string
}

// 查询自动回复配置列表
export const getWelcomeConfigPage = async (params) => {
    return await request.get({url: `/service/welcome-config/page`, params})
}

// 查询自动回复配置详情
export const getWelcomeConfig = async (id: number) => {
    return await request.get({url: `/service/welcome-config/get?id=` + id})
}

// 新增自动回复配置
export const createWelcomeConfig = async (data: WelcomeConfigVO) => {
    return await request.post({url: `/service/welcome-config/create`, data})
}

// 修改自动回复配置
export const updateWelcomeConfig = async (data: WelcomeConfigVO) => {
    return await request.put({url: `/service/welcome-config/update`, data})
}

// 删除自动回复配置
export const deleteWelcomeConfig = async (id: number) => {
    return await request.delete({url: `/service/welcome-config/delete?id=` + id})
}

// 导出自动回复配置 Excel
export const exportWelcomeConfig = async (params) => {
    return await request.download({url: `/service/welcome-config/export-excel`, params})
}